package com.by.feign.fallback;

import com.by.common.core.bean.ResultBean;
import com.by.common.core.response.R;
import com.by.feign.client.UserRemoteClient;
import com.by.feign.dto.UserDto;
import org.springframework.stereotype.Component;

@Component
public class UserRemoteFallback implements UserRemoteClient {

    /**
     * * feign调用  降级处理
     *
     * @param id 用户id
     * @param id
     */
    @Override
    public ResultBean<UserDto> getById(int id) {
        return R.fail("获取远程用户信息失败");
    }
}
